package com.swjd.controller;

import com.swjd.util.SMS;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by hxl on 2019/6/5  11:38
 */
@Controller
@RequestMapping(value = "action/", method = RequestMethod.POST)
public class OtherController {

    @ResponseBody
    @RequestMapping("sendCode")
    public String sendCode(@RequestParam("phone") String phone, @RequestParam("code") String code) {
        return SMS.sendCode(phone, code);
    }
}
